<!-- 测试ztree树 -->
<template>
  <div>
         <ts-tree
              :source="treeObj"
              width="98%"
              height="100%"
              row-id="id"
              :is-border="false"
              :checkRows="checkRows"
              :expandAll="true"
              :search-words="keywords"
              ref="portTree"
            ></ts-tree>
  </div>
</template>

<script>
export default {
  data () {
    return {
        keywords:'',
        checkRows:[],
           treeObj: {
        dataType: 'local',
        data: [],
        textName: 'name',
        childName: 'children',
        type:'checkbox'
      },
    };
  },

  components: {},

  computed: {},

  watch:{},

  mounted() {
    this.treeObj.data = [
  {
    "id": "43",
    "typeCode": "DATA_SET",
    "typeName": "数据集标准",
    "code": "WS445",
    "name": "电子病历基本数据集",
    "pid": "0",
    "sort": 0,
    "isDeleted": "N",
    "status": 1,
    "children": [
      {
        "id": "44",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.1",
        "name": "病历概要",
        "pid": "43",
        "sort": 1,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "45",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.1.1",
            "name": "患者基本信息",
            "pid": "44",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "46",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.1.2",
            "name": "基本健康信息",
            "pid": "44",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "47",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.1.3",
            "name": "卫生事件摘要",
            "pid": "44",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "48",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.1.4",
            "name": "医疗费用记录",
            "pid": "44",
            "sort": 4,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "49",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.2",
        "name": "门(急)诊病历",
        "pid": "43",
        "sort": 2,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "50",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.2.1",
            "name": "门急诊病历",
            "pid": "49",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "51",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.2.2",
            "name": "急诊留观病历",
            "pid": "49",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "52",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.3",
        "name": "门(急)诊处方",
        "pid": "43",
        "sort": 3,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "53",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.3.1",
            "name": "西药处方",
            "pid": "52",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "54",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.3.2",
            "name": "中药处方",
            "pid": "52",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "55",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.4",
        "name": "检查检验记录",
        "pid": "43",
        "sort": 4,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "56",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.4.1",
            "name": "检查记录",
            "pid": "55",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "57",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.4.2",
            "name": "检验记录",
            "pid": "55",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "58",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.5",
        "name": "一般治疗处置记录",
        "pid": "43",
        "sort": 5,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "59",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.1",
            "name": "治疗记录",
            "pid": "58",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "60",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.2",
            "name": "一般手术记录",
            "pid": "58",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "61",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.3",
            "name": "麻醉术前访视记录",
            "pid": "58",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "62",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.4",
            "name": "麻醉记录",
            "pid": "58",
            "sort": 4,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "63",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.5",
            "name": "麻醉术后访视记录",
            "pid": "58",
            "sort": 5,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "64",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.5.6",
            "name": "输血记录",
            "pid": "58",
            "sort": 6,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "65",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.6",
        "name": "助产记录",
        "pid": "43",
        "sort": 6,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "66",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.6.1",
            "name": "待产记录",
            "pid": "65",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "67",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.6.2",
            "name": "阴道分娩记录",
            "pid": "65",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "68",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.6.3",
            "name": "剖宫产手术记录",
            "pid": "65",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "69",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.7",
        "name": "护理操作记录",
        "pid": "43",
        "sort": 7,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "70",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.1",
            "name": "一般护理记录",
            "pid": "69",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "71",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.2",
            "name": "病危（重）护理记录",
            "pid": "69",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "72",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.3",
            "name": "手术护理记录",
            "pid": "69",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "73",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.4",
            "name": "生命体征测量记录",
            "pid": "69",
            "sort": 4,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "74",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.5",
            "name": "出入量记录",
            "pid": "69",
            "sort": 5,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "75",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.7.6",
            "name": "高值耗材使用记录",
            "pid": "69",
            "sort": 6,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "76",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.8",
        "name": "护理评估与计划",
        "pid": "43",
        "sort": 8,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "77",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.8.1",
            "name": "入院评估记录",
            "pid": "76",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "78",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.8.2",
            "name": "护理计划记录",
            "pid": "76",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "79",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.8.3",
            "name": "出院评估与指导记录",
            "pid": "76",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "80",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.9",
        "name": "知情告知信息",
        "pid": "43",
        "sort": 9,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "81",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.1",
            "name": "手术同意书",
            "pid": "80",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "82",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.2",
            "name": "麻醉知情同意书",
            "pid": "80",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "83",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.3",
            "name": "输血治疗同意书",
            "pid": "80",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "84",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.4",
            "name": "特殊检查及特殊治疗同意书",
            "pid": "80",
            "sort": 4,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "85",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.5",
            "name": "病危（重）通知书",
            "pid": "80",
            "sort": 5,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "86",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.9.6",
            "name": "其他知情同意书",
            "pid": "80",
            "sort": 6,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "87",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.10",
        "name": "住院病案首页",
        "pid": "43",
        "sort": 10,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "88",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.10.1",
            "name": "住院病案首页",
            "pid": "87",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "89",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.11",
        "name": "中医住院病案首页",
        "pid": "43",
        "sort": 11,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "90",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.11.1",
            "name": "中医住院病案首页",
            "pid": "89",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "91",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.12",
        "name": "入院记录",
        "pid": "43",
        "sort": 12,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "92",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.12.1",
            "name": "入院记录",
            "pid": "91",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "93",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.12.2",
            "name": "24h内入出院记录",
            "pid": "91",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "94",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.12.3",
            "name": "24h内入院死亡记录",
            "pid": "91",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "95",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.13",
        "name": "住院病程记录",
        "pid": "43",
        "sort": 13,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "96",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.1",
            "name": "首次病程记录",
            "pid": "95",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "97",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.2",
            "name": "日常病程记录",
            "pid": "95",
            "sort": 2,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "98",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.3",
            "name": "上级医师查房记录",
            "pid": "95",
            "sort": 3,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "99",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.4",
            "name": "疑难病例讨论",
            "pid": "95",
            "sort": 4,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "100",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.5",
            "name": "交接班记录",
            "pid": "95",
            "sort": 5,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "101",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.6",
            "name": "转科记录",
            "pid": "95",
            "sort": 6,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "102",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.7",
            "name": "阶段小结",
            "pid": "95",
            "sort": 7,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "103",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.8",
            "name": "抢救记录",
            "pid": "95",
            "sort": 8,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "104",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.9",
            "name": "会诊记录",
            "pid": "95",
            "sort": 9,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "105",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.10",
            "name": "术前小结",
            "pid": "95",
            "sort": 10,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "106",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.11",
            "name": "术前讨论",
            "pid": "95",
            "sort": 11,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "107",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.12",
            "name": "术后首次病程记录",
            "pid": "95",
            "sort": 12,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "108",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.13",
            "name": "出院记录",
            "pid": "95",
            "sort": 13,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "109",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.14",
            "name": "死亡记录",
            "pid": "95",
            "sort": 14,
            "isDeleted": "N",
            "status": 1,
            "children": null
          },
          {
            "id": "110",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.13.15",
            "name": "死亡病例讨论记录",
            "pid": "95",
            "sort": 15,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "111",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.14",
        "name": "住院医嘱",
        "pid": "43",
        "sort": 14,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "112",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.14.1",
            "name": "住院医嘱",
            "pid": "111",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "113",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.15",
        "name": "出院小结",
        "pid": "43",
        "sort": 15,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "114",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.15.1",
            "name": "出院小结",
            "pid": "113",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "115",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.16",
        "name": "转诊(院)记录",
        "pid": "43",
        "sort": 16,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "116",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.16.1",
            "name": "转诊(院)记录",
            "pid": "115",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      },
      {
        "id": "117",
        "typeCode": "DATA_SET",
        "typeName": "数据集标准",
        "code": "WS445.17",
        "name": "医疗机构",
        "pid": "43",
        "sort": 17,
        "isDeleted": "N",
        "status": 1,
        "children": [
          {
            "id": "118",
            "typeCode": "DATA_SET",
            "typeName": "数据集标准",
            "code": "WS445.17.1",
            "name": "医疗机构信息",
            "pid": "117",
            "sort": 1,
            "isDeleted": "N",
            "status": 1,
            "children": null
          }
        ]
      }
    ]
  }
]
  },

  created() {}, 

  methods: {}
}

</script>
<style lang='scss' scoped>
</style>